package com.im.service.impl;

import com.alibaba.fastjson2.JSON;
import com.im.constant.RedisConstant;
import com.im.entity.ImSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ImSessionCacheService {

    @Autowired
    private RedisTemplate<String, Object> redisTemplate;

    // Redis key 格式：im:session:user:{userId}
    private String buildSessionKey(Integer userId) {
        return RedisConstant.SESSION_USER_PREFIX + userId;
    }
}
